# -*- coding: utf-8 -*-

from django import forms

class RegisterForm(forms.Form):
    username = forms.CharField(
            label=u'用户名',
            max_length=16,
            required=False
            )
    city   = forms.CharField(
            label=u'城市',
            max_length=16,
            required=False
            )
    avatar = forms.ImageField(
            label=u'头像',
            widget=forms.FileInput(attrs={'size':16}),
            )
    email = forms.EmailField(
            label=u'电子邮件',
            required=False
            )
    password1 = forms.CharField(
            label=u'密码',
            widget=forms.PasswordInput(),
            required=False
            )
    password2 = forms.CharField(
            label=u'确认密码',
            widget=forms.PasswordInput(),
            required=False
            )

class SignInForm(forms.Form):
    signin_username = forms.CharField(
        label=u'用户名',
        max_length=16,
        required=True
        )
    signin_password = forms.CharField(
        label=u'密码',
        widget=forms.PasswordInput(),
        required=True
        )

